﻿using Luna.Data.Configuration;

namespace Luna.Connectors.ZohoCRM
{
    internal class ZohoCRMConfiguration : ConnectorConfiguration, IZohoCRMSettings
    {
        private const string API_KEY = "ApiKey";

        public ZohoCRMConfiguration(IConnector P_Connector)
            : base(P_Connector)
        {
            Parameters[API_KEY] = null;
        }

        public ZohoCRMConfiguration(IConnector P_Connector, IConnectorData P_Data)
            : base(P_Connector, P_Data)
        {
        }

        public string APIKey
        {
            get
            {
                return Parameters[API_KEY];
            }

            set
            {
                Parameters[API_KEY] = value;
                SaveParameters();
            }
        }

        public override ConnectorType Type
        {
            get { return ConnectorType.ZohoCRM; }
        }
    }
}